Loading...
 

CX_COND_WRAPPER - Conditioned Wrapper

CX_COND_WRAPPER

Class hierarchy
Description:

A conditioned wrapper is a conditioned bag that behaves like a wrapper on the outside. This means that operations carried out with the CX_COND_WRAPPER (put, copy, etc.) are carried out with the object to which this object points.

When accessing a Conditioned Wrapper (W), the formulas stored in the Conditioned Bag (C) are evaluated one after the other. The objects that are located on the plug space are used for this. As soon as a formula is found whose truth value is 1, the object (O) associated with this formula is returned. From InstantView® this looks as if the Conditioned Wrapper is exactly this object. So the programmer can treat the Conditioned Wrapper as if it was the desired object.

Attention!
In contrast to the descriptive and overwriting wrapper, the conditioned wrapper cannot include additional attributes or even overwrite values. All operations are directly passed on to the respective object! The Conditioned Wrapper is quasi transparent.

Important!
Before each access to a Conditioned Wrapper it must be ensured that the plugspace is set correctly. In the best case, an error message will appear that no suitable object was found, in the worst case an incorrect object or, even worse, the correct object will be returned.

Code example:
Var(condWrapper,a) CreateTransObject(CX_COND_WRAPPER) // Conditioned Wrapper (W) erzeugen -> condWrapper CreateTransObject(CX_PERSON) -> a // Objekt (O) erzeugen "Alpha" a Put(name) "counter = 0" a condWrapper Call(GetConditionedBag) Insert // Objekt dem Conditioned Wrapper hinzufügen // unter der Bedingung, dass "x = 0" ist // (anstelle von counter kann ein beliebiger Slot stehen) CreateTransObject(CX_CONTAINER) // Objekt erzeugen, dass "x = 0" enthält 0 Over Put(counter) PlugSpace // "counter = 0" befindet sich jetzt im PlugSpace condWrapper Copy(name) Attention // Gibt "Alpha" aus

List of methods (MDI)
Function MA* Parameters Return Brief description
GetConditionedBag OBJECT Returns the conditioned bag on which CX_COND_WRAPPER is based
Pick OBJECT Picks the object from the contained Conditioned Bag that first matches the values on the Plugspace
GetDomain INTEGER Domain of this object
GetSiblings COLLECTION All siblings of this object
GetSiblings2 COLLECTION All siblings of this object
SetDomain INTEGER, INTEGER Set domain
string INTEGER CX_STRING Returns the string representation of the object
Unlink2 Remove this object from the list of objects with validity
VerifySiblings INTEGER Check ring of exchange objects

* MA = Member Access function,
grey background = inherited function

Use in AppsWH
Module Brief description